if exists (select 1
            from  sysobjects
           where  id = object_id('bd_sys_dim_date')
            and   type = 'U')
   drop table bd_sys_dim_date
go

/*==============================================================*/
/* Table: bd_sys_dim_date                                       */
/*==============================================================*/
create table bd_sys_dim_date (
   date_key             int                  not null,
   date                 date                 not null,
   date_year            int                  not null,
   date_month           int                  not null,
   date_day             int                  not null,
   date_week            int                  not null,
   date_week_name       varchar(20)          not null,
   constraint PK_BD_SYS_DIM_DATE primary key (date_key)
)
go
